package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author du
 * date 2018/8/2 下午3:53
 */
public class MessageEntity implements Parcelable {
    /**
     * members_id : 542
     * content : <p>孩子选的是2，因为题目写的是至少选到二等房，所以她没有考虑一等房。解析中说：至少选到二等房及以上。题目有必要改成“选到二等房及以上”吗？还是不用改，这就是考点？陷阱？</p>
     * posttime : 1495196296
     * answer_posttime : 1495205493
     * answer_content : <p>亲爱的家长，您好！对于这道题目，我们是否可以这样来理解：按常理而言，第一名肯定会选一等房，第二、三名肯定会选二等房，所以题目考察的就是这个点，天天父子想至少选到二等房，也就是说他们第一名的话肯定会考虑一等房的意思，注意这里“至少”这个词的含义，其实就是“二等房及以上”这一意思。所以老师认为题目是没有问题的，不过为了更完善题干信息表达，老师对“至少”这一词做了更改，希望可以不产生误解。如果还有问题，希望您再留言给我。</p>
     * username : 晓卓
     * avatar : http://api.niuwaketang.com/public/avatar/avatar.png
     */

    private String members_id;//用户id
    private String content;//留言内容
    private String posttime;//留言时间
    private String answer_posttime;//老师回复时间
    private String answer_content;//老师回复内容
    private String username;//留言用户名
    private String avatar;//留言用户头像

    /**
     * answer_teacher_nicename : 牛娃老师
     * answer_teacher_avatar : http://api.niuwaketang.com/public/avatar/teacher_avatar.png
     */
    private String answer_teacher_nicename;//回复老师名
    private String answer_teacher_avatar;//回复老师头像
    private int status;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMembers_id() { return members_id;}

    public void setMembers_id(String members_id) { this.members_id = members_id;}

    public String getContent() { return content;}

    public void setContent(String content) { this.content = content;}

    public String getPosttime() { return posttime;}

    public void setPosttime(String posttime) { this.posttime = posttime;}

    public String getAnswer_posttime() { return answer_posttime;}

    public void setAnswer_posttime(String answer_posttime) { this.answer_posttime = answer_posttime;}

    public String getAnswer_content() { return answer_content;}

    public void setAnswer_content(String answer_content) { this.answer_content = answer_content;}

    public String getUsername() { return username;}

    public void setUsername(String username) { this.username = username;}

    public String getAvatar() { return avatar;}

    public void setAvatar(String avatar) { this.avatar = avatar;}

    public String getAnswer_teacher_nicename() { return answer_teacher_nicename;}

    public void setAnswer_teacher_nicename(String answer_teacher_nicename) { this.answer_teacher_nicename = answer_teacher_nicename;}

    public String getAnswer_teacher_avatar() { return answer_teacher_avatar;}

    public void setAnswer_teacher_avatar(String answer_teacher_avatar) { this.answer_teacher_avatar = answer_teacher_avatar;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.members_id);
        dest.writeString(this.content);
        dest.writeString(this.posttime);
        dest.writeString(this.answer_posttime);
        dest.writeString(this.answer_content);
        dest.writeString(this.username);
        dest.writeString(this.avatar);
        dest.writeString(this.answer_teacher_nicename);
        dest.writeString(this.answer_teacher_avatar);
    }

    public MessageEntity() {}

    protected MessageEntity(Parcel in) {
        this.members_id = in.readString();
        this.content = in.readString();
        this.posttime = in.readString();
        this.answer_posttime = in.readString();
        this.answer_content = in.readString();
        this.username = in.readString();
        this.avatar = in.readString();
        this.answer_teacher_nicename = in.readString();
        this.answer_teacher_avatar = in.readString();
    }

    public static final Creator<MessageEntity> CREATOR = new Creator<MessageEntity>() {
        @Override
        public MessageEntity createFromParcel(Parcel source) {return new MessageEntity(source);}

        @Override
        public MessageEntity[] newArray(int size) {return new MessageEntity[size];}
    };
}
